<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "user_broker_commission_record".
 *
 * @property int $id
 * @property int $brokerId 该佣金对应的代理商Id
 * @property int $lower_brokerId 给该代理商提供佣金的下级代理商Id
 * @property int $templateId 该佣金对应的手续费率模板id(代理商为下级设置的模板,不是代理商本身的模板)
 * @property int $tradeId 该佣金对应的交易Id
 * @property string $tradeCost 该佣金的值
 * @property string $time 收取该佣金时间
 */
class UserBrokerCommissionRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_broker_commission_record';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['brokerId', 'lower_brokerId', 'templateId', 'tradeId'], 'integer'],
            [['tradeCost'], 'number'],
            [['time'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'brokerId' => 'Broker ID',
            'lower_brokerId' => 'Lower Broker ID',
            'templateId' => 'Template ID',
            'tradeId' => 'Trade ID',
            'tradeCost' => 'Trade Cost',
            'time' => 'Time',
        ];
    }
}
